package com.vshop.platform.system.controller.monitor;

import com.vshop.framework.core.domain.R;
import com.vshop.framework.mybatisflex.page.PageData;
import com.vshop.framework.mybatisflex.page.PageQuery;
import com.vshop.platform.system.crud.service.SysLoginLogService;
import com.vshop.platform.system.domain.param.SysLoginLogParam;
import com.vshop.platform.system.domain.vo.SysLoginLogVo;
import lombok.RequiredArgsConstructor;

import org.springframework.web.bind.annotation.*;


/**
 * 系统访问记录 控制层。
 *
 * @author vshop
 * @since 2024-11-10
 */
@RequiredArgsConstructor
@RestController
@RequestMapping("/sysLoginLog")
public class SysLoginLogController {

    private final SysLoginLogService loginLogService;

    /**
     * 分页查询系统访问记录。
     *
     * @param pageQuery 分页对象
     * @return 分页对象
     */
    @GetMapping("/page")
    public R<PageData<SysLoginLogVo>> page(@ModelAttribute SysLoginLogParam param,
                                                        @ModelAttribute PageQuery pageQuery) {
        return R.ok(loginLogService.page(param, pageQuery));
    }

}
